package com.telecom.controller.access;

import com.dahuatech.icc.exception.ClientException;
import com.telecom.common.AjaxResult;
import com.telecom.config.dto.InOutReCordQueryParam;
import com.telecom.domain.AcInOutRecord;
import com.telecom.service.AccessControlService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/access")
public class AccessTestController {

    @Resource
    private AccessControlService accessControlService;

    //出入明细查询
    @PostMapping("/in/out/record/search")
    public AjaxResult inOutRecordSearch(@RequestBody InOutReCordQueryParam inOutReCordQueryParam) throws ClientException {
        List<AcInOutRecord> acInOutRecordList = accessControlService.inOutRecordSearch(inOutReCordQueryParam);
        return AjaxResult.success(200,"成功",acInOutRecordList);
    }
}
